﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:controls="clr-namespace:Earthwatchers.UI.GUI.Controls"
    xmlns:loaders="clr-namespace:Earthwatchers.UI.GUI.Loaders" 
	mc:Ignorable="d"
	x:Class="Earthwatchers.UI.GUI.Controls.TimeLineControl" Height="Auto" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">
    <UserControl.Resources>
        <Storyboard x:Name="TutorialStoryBoard">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" FillBehavior="HoldEnd" RepeatBehavior="5x" Storyboard.TargetName="highlight">
                <LinearDoubleKeyFrame KeyTime="0:0:0.5" Value="1" />
                <LinearDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="SliderAnimation1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Value" Storyboard.TargetName="sliderOpacity">
                <LinearDoubleKeyFrame KeyTime="0:0:1" Value="40" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="SliderAnimation2">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Value" Storyboard.TargetName="sliderOpacity">
                <LinearDoubleKeyFrame KeyTime="0:0:1" Value="100" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" VerticalAlignment="Top" Canvas.ZIndex="2">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition />
            <ColumnDefinition Width="210" />
        </Grid.ColumnDefinitions>
        <Path Data="M 130,0 145,32 130,64 0,64 0,0 Z" Stroke="#FFb0cf0f" StrokeThickness="1">
            <Path.Fill>
                <SolidColorBrush Color="Black" Opacity="0.5" />
            </Path.Fill>
        </Path>
        <Rectangle x:Name="highlight" Opacity="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,25,0,0" Width="125" Height="30" Fill="Transparent" Stroke="#FFb6d220" StrokeThickness="3" />
        <Grid Margin="10,8,20,10" VerticalAlignment="Top" Width="130" HorizontalAlignment="Left">
            <Grid.RowDefinitions>
                <RowDefinition Height="23" />
                <RowDefinition Height="20" />
            </Grid.RowDefinitions>
            <TextBlock Text="{Binding Path=Layers1, Source={StaticResource Labels}}" VerticalAlignment="Top" Foreground="#FF9cb60e" FontSize="15" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Bold.otf#Myriad Pro" />

            <StackPanel Grid.Row="1" Orientation="Horizontal" ToolTipService.ToolTip="{Binding Path=Layers11, Source={StaticResource Labels}}">
                <ComboBox x:Name="ImagesCombo" DisplayMemberPath="DateName" SelectedValuePath="Id" Width="90" Margin="0,0,5,0" SelectionChanged="ImagesCombo_SelectionChanged" />
                <Image Source="../../Resources/Images/add.png" Stretch="None" />
            </StackPanel>
        </Grid>

        <Grid Grid.Column="1" Margin="-20,0,0,0" Height="65" VerticalAlignment="Top">
            <Path Data="M 0,0 15,32 0,64 450,64 450,0 Z" Stroke="#FFb0cf0f" StrokeThickness="1">
                <Path.Fill>
                    <SolidColorBrush Color="Black" Opacity="0.5" />
                </Path.Fill>
            </Path>
            <Grid Height="24">
                <Slider Margin="10,4,10,0" x:Name="sliderOpacity" Width="410" Cursor="Hand" ValueChanged="sliderOpacity_ValueChanged"
                        MouseLeftButtonUp="sliderOpacity_MouseLeftButtonUp"
                        VerticalAlignment="Center" BorderThickness="0" Value="100" Minimum="0" Maximum="100"
                        ToolTipService.ToolTip="{Binding Path=Layers12, Source={StaticResource Labels}}" />
            </Grid>
            <Grid x:Name="TimelineMarkersGrid" Margin="21,0,28,0" VerticalAlignment="Center" Height="22">
            </Grid>
            <Grid x:Name="DatesGrid" Margin="13,0,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="22" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                </Grid.ColumnDefinitions>
            </Grid>
        </Grid>
        <StackPanel x:Name="layerWrapper" VerticalAlignment="Top" Orientation="Horizontal" Grid.Column="2" Margin="0,-1,0,0" Canvas.ZIndex="1">
            <Border x:Name="loading" BorderThickness="1,1,1,1" BorderBrush="#80b0cf0f"  Height="66" Width="211" Visibility="Collapsed">
                <Border.Background>
                    <SolidColorBrush Color="Black" Opacity="0.5" />
                </Border.Background>
                <StackPanel  >
                    <TextBlock Text="{Binding Cargando, Source={StaticResource Labels}}" FontFamily="Arial" Foreground="White" FontSize="13" Margin="10"  VerticalAlignment="Center" HorizontalAlignment="Center" />
                    <loaders:_3D VerticalAlignment="Center" Margin="0" />
                </StackPanel>
            </Border>
        </StackPanel>
    </Grid>
</UserControl>